package com.example.game.app.util;

import com.alibaba.druid.filter.config.ConfigTools;

public class DruidEncryptor {
    public static void main(String[] args) throws Exception {
        String password = "LJNYHHD"; // 明文密码
        String[] keyPair = ConfigTools.genKeyPair(512); // 生成密钥对
        String privateKey = keyPair[0];
        String publicKey = keyPair[1];
        String encryptedPassword = ConfigTools.encrypt(privateKey, password);

        System.out.println("Public Key: " + publicKey);
        System.out.println("Encrypted Password: " + encryptedPassword);
    }
}
